class_name ObjectPoolSystem
extends BaseSystem

@export var pool_managers:Array
var pool_manager_dict:Dictionary = {}

func init_system():
	for pool_manager in pool_managers:
		pool_manager_dict[pool_manager.pool_manager_name] = pool_manager.duplicate(true)
		pool_manager_dict[pool_manager.pool_manager_name].init_pool_manager(self)
func get_object(pool_manager_name:String,pool_name:String):
	if not pool_manager_dict.has(pool_manager_name):
		return null
	return pool_manager_dict[pool_manager_name].get_from_pool(pool_name)
func put_object(pool_manager_name:String,pool_name:String,scene):
	if not pool_manager_dict.has(pool_manager_name):
		return null
	pool_manager_dict[pool_manager_name].back_to_pool(pool_name,scene)
